import {createRouter, createWebHistory, RouteRecordRaw} from "vue-router"
import AppLayout from "../components/layout/AppLayout.vue"
import IndexVue from "../views/IndexVue.vue"
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "Home",
    component: () => AppLayout,
    children: [
      {
        path: '',
        component: IndexVue
      },
      {
        path: "/about",
        name: "about",
        component:() => import("../views/AboutVue.vue")
      },
      {
        path: "/:xxx(.*)*",
        name: "ErrorPage",
        component:() => import("../views/Error.vue")
      }
    ]
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes
  }
)

export default router
